#!/bin/bash

for port in $(seq 1 6);do
mkdir -p  ./redis/node-${port}/conf
touch ./redis/node-${port}/conf/redis.conf
cat > ./redis/node-${port}/conf/redis.conf << eof
port 6379
bind 0.0.0.0
cluster-enabled yes
cluster-config-file nodes.conf
cluster-node-timeout 5000
cluster-announce-port 6379
cluster-announce-bus-port 16379
appendonly yes
eof
done

